return {
  "stevearc/conform.nvim",
  keys = {
    {
      "<leader>fm",
      function()
        require("conform").format({ async = true })
      end,
      mode = { "n", "v" },
      desc = "Custom format",
    },
  },
  opts = {
    log_level = vim.log.levels.INFO,
    formatters_by_ft = {
      -- Conform will run the first available formatter
      -- python = { "ruff" },
      -- markdown = { "markdownlint-cli2" },
    },

    formatters = {
      prettier = {
      prepend_args = { "--print-width", "120", "--use-tabs", "--no-semi" },
        env = { PRETTIERD_DEFAULT_CONFIG = vim.fn.expand("~/.config/.prettierrc") },
      --
        },

      shfmt = {
        prepend_args = { "-i", "4" },
      },
      ruff = {
        -- 覆盖默认的配置
        -- https://github.com/stevearc/conform.nvim/blob/master/lua/conform/formatters/ruff_fix.lua
        inherit = false,
        command = "ruff",
        args = { "format", "--stdin-filename", "$FILENAME", "-" },
        -- args = { "format", "--config", "~/.config/nvim/.ruff.toml", "--stdin-filename", "$FILENAME", "-" },

        -- prepend_args = { "--config", "~/.config/nvim/.ruff.toml" },
      },
    },
  },
}
